﻿
namespace Bettzueche.RLLibrary.Types
{
    /// <summary>
    /// Default <see cref="IAction"/> implementation with an ID-Number for actions.<br />
    /// Supports an implicit cast from and to int.
    /// </summary>
    public struct DefaultAction : IActionID
    {
        /// <summary>ID of this Action</summary>
        int _myID;
        public DefaultAction(int id)
        {
            _myID = id;
        }

        public static implicit operator int(DefaultAction a)
        {
            return a._myID;
        }
        public static implicit operator DefaultAction(int i)
        {
            return new DefaultAction(i);
        }

        /// <summary>ID of this Action</summary>
        /// <value>ID of this Action; should be unique</value>
        public int ID {
            get { return _myID; }
            set { _myID = value; }
        }
    }
}
